[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
segread() Return Current Values of Segment Registers
#include <dos.h>
void segread(segregs);
struct SREGS *segregs; Segment register values
segread() sets the fields in 'segregs' to the current contents of the
segment registers. The segment registers are needed when using the
intdosx() and int86x() functions.
Returns: Nothing
Notes: Segment registers for 'far' pointers can be obtained
with the FP_SEG() macro.
Portability: MS-DOS only.
-------------------------------- Example ---------------------------------
The following statements print the current contents of the segment
registers.
#include <dos.h> /* for segread() and struct SREGS */
#include <stdio.h> /* for printf() */
struct SREGS segregs;
main()
{
segread(&segregs);
printf("CS: %u DS: %u ES: %u SS: %u\n",
segregs.cs, segregs.ds, segregs.es, segregs.ss);
}
See Also:
intdosx()
int86x()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson